import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router'
import './utils/filter.js'
Vue.use(ElementUI)
Vue.config.productionTip = false
Vue.use(VueRouter)


new Vue({
  render: h => h(App),
  router:router,
  beforeCreate() {
		Vue.prototype.$bus = this; //安装全局事件总线
    this.$on('problemDetails',(id)=>{
      console.log("事件总线绑定的方法被触发。传入参数为",id);
      this.$router.push({
        name:'problem',
        query:{id}
    })
    });
	},
}).$mount('#app')
